extends layout

block head
  link(rel='stylesheet' href='/stylesheets/video-js.css')
  link(rel='stylesheet' href='/stylesheets/bootstrap.css')
  script(type='text/javascript' src='/javascripts/video.js')
  script(type='text/javascript' src='/javascripts/socket.io.slim.js')
  script(type='text/javascript' src='/javascripts/controller.js')


block content
  div.player
    div(style='margin-top: 0; margin-left: 0; width: 640px;')
      - const posterPath = '/images/' + fileName.replace('.mp4', '.jpg')
      - const videoPath = '/videos/' + fileName
      video#player.video-js(preload='auto' width='640' height='480' poster=posterPath data-setup='{}' controls=)
        source(src=videoPath)
    div.content
      textarea.panel.panel-info.message#content(placeholder='content...')
      div(style='style=float: right;')
        input#username.form-control(placeholder='input a username(unknown by default)' style='width: 320px; margin-right: 10px; border-radius: 4px; display: inline-block;')
        button.btn.btn-default(onclick='onSubmit()' style='float: right;') send

  ul.list-group.panel.panel-info.chat-box#chatBox

